import Mock from 'mockjs'
import routerAPI from './router'
import loginAPI from './login'

Mock.setup({
  timeout: '350-600'
})

// 登录相关
Mock.mock(/\/oauth\/token/, 'post', loginAPI.login)
Mock.mock(/\/user\/logout/, 'post', loginAPI.logout)
Mock.mock(/\/lsp\/queryUserInfo\.*/, 'get', loginAPI.queryUserInfo)

// 获取路由
// Mock.mock(/\/nav\/getTopNavs/, 'post', routerAPI.getTopNavs)
// Mock.mock(/\/nav\/getSideNavs/, 'post', routerAPI.getSideNavs)
Mock.mock(/\/permission\/levelOne/, 'get', routerAPI.getTopNavs)
Mock.mock(/\/permission\/levelTwo/, 'get', routerAPI.getSideNavs)

export default Mock
